package
{

	import flash.display.MovieClip;


public dynamic class Raincloud extends MovieClip
{
    var grav: Number = 1.2;
	/*
    var _name;
    var _parent;
    var _x;
    var _y;
	*/
    var hArea;
    var mc;
    var num;
    var stayCount;
    var xv;

    function Raincloud()
    {
        super();
    }

    function init()
    {
        this.num = Number(this.name.substr(4, this.name.length - 4));
        trace("num:" + this.num);
        var __reg2 = this.parent.parent.findPathPoint(this.x);
        this.y = this.parent.parent.pointsA[__reg2].y;
        this.stayCount = 0;
        SoundManager.startSound("rain", 0, 1000);
    }

    function EF()
    {
        var __reg2 = this.parent.parent.checkEnemyHit(this.hArea);
        if (__reg2.length > 0) 
        {
            var __reg3 = this.xv;
            for (var __reg4 in __reg2) 
            {
                this.mc.lightning.gotoAndPlay(2);
                __reg2[__reg4].electrify(__reg3);
            }
        }
        if (this.stayCount++ == 100) 
        {
            this.mc.gotoAndPlay("out");
            SoundManager.stopSound("rain");
        }
    }

}


}